﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Speaker_Toggle : MonoBehaviour
{
    public Toggle toggle;
    //public Component Sound_Controller;
    private float MinVolume = -20f;
    private float MaxVolume = 10f;
    // Start is called before the first frame update
    void Start()
    {
        toggle.isOn = false;
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    //public Slider slider;
    public void SetMin(float min)
    {
        MinVolume = min;
    }
    public void SetMax(float max)
    {
        MaxVolume = max;
    }
    
    public void check_mute(float volume)
    {
        if (volume == MinVolume)
        {
            toggle.isOn = true;
        }
        else
        {
            toggle.isOn = false;
        }
    }
}
